import matplotlib.pyplot as plt # 导入pyplot模块
plt.rcParams['font.sans-serif'] = ['SimHei'] # 解决中文乱码问题
min_temps = [22, 23, 24, 25, 24, 25, 24, 23, 22, 23, 24, 25, 24, 23, 22]
max_temps = [29, 30, 31, 32, 33, 34, 31, 30, 29, 30, 32, 33, 31, 30, 29]
precipitation = [3.2, 5.1, 0.0, 0.5, 8.7, 15.4, 12.3, 2.1, 0.0, 1.2, 6.8, 20.1,7.5, 3.0, 0.2]
plt.figure(figsize=(16,8))
plt.bar(months,precipitation,color='blue',label='降水量')


plt.savefig('temp.png')
plt.show()